package ioc15;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class SomeBeanPropertyPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
//        if("someBean".equals(beanName)){
//
//        }

        if(bean instanceof SomeBean){
            SomeBean someBean= (SomeBean) bean;

            someBean.setStr(someBean.getStr().toUpperCase());


        }
        return bean;
//        return "abc";
    }



}
